using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class UpgradeMaxHPs : UpgradeButton {

	protected override int CostForLevel() {
		return (int)(100 * Mathf.Pow(2, (gm.maxHPs-10)/10));
	}

	override public void Clicked() {
		if(gm.score < CostForLevel())
			return;

		gm.score -= CostForLevel();

		gm.maxHPs += 5;
	}

	override protected string UpgradeName() {
		return "Increase max HPs of all player units to "+ (gm.maxHPs + 5f).ToString("f0") +".";
	}

}
